Don't aggressively toss vowels when we're makign waypoint names that aren't
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 18 Apr 2006 21:41:53 +0000 (21:41 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 18 Apr 2006 21:41:53 +0000 (21:41 +0000)
really very short anyway.

gpsbabel/mkshort.c

index 4a156923d9905f90dceec1014fb91bf3b97520d4..d99d28bcb5e0139d37dc4f22a1b092ac12d3b505 100644 (file)
@@ -472,8 +472,16 @@ mkshort(short_handle h, const char *istring)
        /*
         * Delete vowels starting from the end.  If it fits, quit stomping
         * them.  If we run out of string, give up.
+        * 
+        * Skip this test is our target length is arbitrarily considered 
+        * "long" as it turns out a truncated string of full words is easier
+        * to read than a full string of vowelless words. 
+        *
+        * It also helps units with speech synthesis.
         */
-       replaced = 1;
+       if ( hdl->target_len < 15) {
+               replaced = 1;
+       }
        while (replaced && strlen(ostring) > hdl->target_len) {
                ostring = delete_last_vowel(2, ostring, &replaced);
        }